{% extends "base_sub.html" %}

{% block title %}
    警告窗口
{% endblock title %}

{% block content %}
<script>
    alert("{% for error in errors %}{{ error }}{% endfor %}");

    try {
        window.close();
    } catch(error) {
        history.back();
    }

    setTimeout(function() {
        if (window.history.length) {
            window.history.back();
        }
    }, 500);
</script>
<noscript>
    <div id="validation_check">
        <h1>下一项有错误.</h1>
        <p class="cbg">
            {% for error in errors %}
                {{ error }}<br>
            {% endfor %}
        </p>
        <p class="cbg">
            关闭新窗口，然后重试上一操作.
        </p>
    </div>
</noscript>
{% endblock content %}